<template>
  <div>
    <!-- 整个后台管理页面的容器，内部为左右结构 -->
    <el-container>
      <!-- 左右结构的左半部分 -->
      <el-aside class="layout-aside" width="200px">
        <el-menu
            router
            class="el-menu-vertical"
            background-color="#545c64"
            text-color="#fff"
            active-text-color="#ffd04b"
        >
          <el-submenu index="/1">
            <template slot="title">
              <i class="el-icon-platform-eleme"></i>
              <span>首页</span>
            </template>
            <el-menu-item index="">
              <span>小区信息展示</span>
            </el-menu-item>
          </el-submenu>

          <el-submenu index="/2">
            <template slot="title">
              <i class="el-icon-s-home"></i>
              <span>小区管理</span>
            </template>
          </el-submenu>

          <el-submenu index="/3">
            <template slot="title">
              <i class="el-icon-s-custom"></i>
              <span>业主管理</span>
            </template>
          </el-submenu>

          <el-submenu index="/4">
            <template slot="title">
              <i class="el-icon-setting"></i>
              <span>道闸管理</span>
            </template>
          </el-submenu>

          <el-submenu index="/5">
            <template slot="title">
              <i class="el-icon-s-operation"></i>
              <span>设备管理</span>
            </template>
          </el-submenu>

          <el-submenu index="/6">
            <template slot="title">
              <i class="el-icon-s-claim"></i>
              <span>通知公告</span>
            </template>
          </el-submenu>

          <el-submenu index="/7">
            <template slot="title">
              <i class="el-icon-user"></i>
              <span>人员管理</span>
            </template>
          </el-submenu>

          <el-submenu index="/8">
            <template slot="title">
              <i class="el-icon-phone"></i>
              <span>帮助页面</span>
            </template>
          </el-submenu>

        </el-menu>
      </el-aside>

      <!-- 左右结构的右半部分 -->
      <el-container class="layout-body">
        <!-- 右半部分的上侧结构 -->
        <el-header class="layout-header">
          <h3>这是右半部分的上册结构</h3>
        </el-header>

        <!-- 右半部分的下侧结构 -->
        <!-- 此部分内容会根据左侧菜单的功能而发生变化 -->
        <el-main>
          <router-view/>
        </el-main>
      </el-container>

    </el-container>
  </div>
</template>

<style>
* {
  margin: 0;
}

.el-menu {
  border: 0 !important;
}

.layout-header {
  background: #7070dd;
  color: #fff;
}

.layout-aside {
  background: #545c64;
  color: #fff;
  height: 100vh;
}

.layout-body {
  position: relative;
}
</style>
